namespace OasisCiq.Xpil
{
    using System;
    using System.Linq;

    /// <summary>
    /// List of information types used for account details
    /// </summary>
    public class AccountElementList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[]
        {
            "AccountID", // The unique name, number or mixed account identifier, e.g. bank account number
            "IssuingAuthority", // The organisation that assigns and manages the account, e.g. a bank, power supplier, etc.
            "AccountType", // Commonly recognised names, such as IRD number (for NZ), SSN (for US), ABN (for AU), etc.
            "AccountBranch",
            "IssuingCountryName" // The country that issued the account
        };

        public AccountElementList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}